﻿<navigation:Page x:Class="Reactor.Client.Views.ServicesView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:navigation="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Navigation" xmlns:Views="clr-namespace:Reactor.Client.Views" xmlns:Controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls.Toolkit" mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400"
    DataContext="{Binding Services, Source={StaticResource Locator}}">
    <navigation:Page.Resources>
        <DataTemplate x:Key="ServiceItemTemplate">
            <Views:ServiceView />
        </DataTemplate>
        <ItemsPanelTemplate x:Key="ServiceItemPanel">
            <Controls:WrapPanel FlowDirection="LeftToRight"  />
        </ItemsPanelTemplate>
    </navigation:Page.Resources>
    <Grid x:Name="LayoutRoot">
        <ScrollViewer x:Name="PageScrollViewer" Style="{StaticResource PageScrollViewerStyle}" >
            <StackPanel x:Name="ContentStackPanel" Style="{StaticResource ContentStackPanelStyle}">
                <TextBlock x:Name="HeaderText" Style="{StaticResource HeaderTextStyle}" Text="{Binding Mode=OneTime, Path=PageTitle}"/>
                <ListBox 
                    ScrollViewer.VerticalScrollBarVisibility="Disabled" 
                    ScrollViewer.HorizontalScrollBarVisibility="Disabled"
                    ItemsSource="{Binding Services}"
                    ItemsPanel="{StaticResource ServiceItemPanel}"
                    ItemTemplate="{StaticResource ServiceItemTemplate}"
                    Padding="5" Width="1000" BorderThickness="0">
                </ListBox>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</navigation:Page>
